package com.gxa.medical.common;
//声明一个枚举，例举所有的异常信息，并常量化


public enum ErrorCode {
    //用户注册失败，该手机号被占用
    //直接在枚举内部声明枚举对象
    //声明时用全大写
    UNKNOWN_EXCEPTION(5000,"对不起，系统开小差了！！！"),
    EXIST_PHONE(50001,"用户注册失败，该手机号被占用"),
    FAILED_LOGIN(50002,"用户登录失败，请检查用户名和密码"),

    FAILED_QUERY(50003,"对不起，id不能为空！！！"),


    ;
    private Integer code;
    private String msg;

    ErrorCode(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
